﻿<div>
    <caltech-header title="PROCEDURE">
        <h3>PROCEDURE</h3>
    </caltech-header>

    <div class="pull-right-print">
        <div class="row">
            <div class="col-xs-2">
                <label>Procedure Name:</label>
            </div>
            <div class="col-xs-4">
                <p editable-text="model.procedureName" buttons="no" blur="submit"><strong>{{model.procedureName}}</strong></p>
            </div>
        </div>
        <div class="row" ng-repeat="item in model.items">
            <div class="col-xs-2">
                <label>Standard {{$index+1}}:</label>
            </div>
            <div class="col-xs-4">
                <!--<p editable-text="item.standardNo" buttons="no" blur="submit">{{item.standardNo}}</p>-->
                <a href="#" editable-text="item.standardNo" buttons="no" blur="submit" e-name="name" onaftersave="updateStandard($data,item)"
                   onbeforesave="updateStandard($data, item)"
                   e-typeahead="standard as standard.standardNo for standard in getStandardList($viewValue)" e-typeahead-editable="false">
                    {{item.standardNo}}
                </a>
            </div>
        </div>
        <div class="row">
            <div class="col-xs-2">
                <label>Temperature: </label>
            </div>
            <div class="col-xs-4">
                <span editable-text="model.temperature" buttons="no" blur="submit">{{model.temperature}}</span>
            </div>
        </div>
        <div class="row">
            <div class="col-xs-2">
                <label>Relative Humidity: </label>
            </div>
            <div class="col-xs-4">
                <span editable-text="model.humidity" buttons="no" blur="submit">{{model.humidity}}</span>
            </div>
        </div>
        <div class="row">
            <div class="col-xs-2">
                <label>Note: </label>
            </div>
            <div class="col-xs-4">
                <span editable-text="model.note" buttons="no" blur="submit">{{model.note}}</span>
            </div>
        </div>
        <div class="row">
            <div class="col-xs-2">
                <label>Approved By:</label>
            </div>
            <div class="col-xs-4">
                <span class="form-control-static">{{model.approveUser.fullName}}</span>
            </div>
        </div>
    </div>
    <page-footer page="1"></page-footer>
</div>

<nav class="navbar navbar-default navbar-fixed-bottom navbar-inverse" role="navigation">
    <div class="container">
        <button class="btn btn-warning navbar-btn" ng-click="back()">Back</button>
        <button class="btn btn-warning navbar-btn pull-right" has-access="ProcedureDelete" busy-click="remove(model)" success="Deleted successfully" ng-show="model.id">Delete</button>
        <button class="btn btn-info navbar-btn" ng-show="model.id" busy-click="update(model)" has-access="ProcedureEdit" success="Updated successfully">Update</button>
        <button class="btn btn-info navbar-btn" ng-hide="model.id" busy-click="save(model)" has-access="ProcedureCreate" success="Created successfully">Save</button>
        <button class="btn btn-info navbar-btn" ng-show="model.id" ng-click="doPrint()"><i class="glyphicon glyphicon-print"></i>&nbsp;Print</button>
    </div>
</nav>
